package com.example.androidkotlinmvvm.xml

import com.example.androidkotlinmvvm.mvvm.Data
import com.example.androidkotlinmvvm.mvvm.RetrofitClient
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow

class MyRepository {

    private val userService = RetrofitClient.userService

    fun getUsers(): Flow<Data> = flow {
        val users = userService.getUsers()
        emit(users)
    }
}